]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
magnifier: Avoid painting a desktop that's fully occluded by its clone
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Fri, 25 Jun 2021 09:09:06 +0000 (17:09 +0800)
committerMarge Bot <marge-bot@gnome.org>
Wed, 18 Aug 2021 14:12:34 +0000 (14:12 +0000)
This significantly reduces the render time for fullscreen zoom mode.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3305
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1899>

js/ui/magnifier.js

index 22581278df486fdd8fbed7d5040d4ba17f6c07a0..180df25460f8ce45fcf3c2ae8ebd2e869e588b0e 100644 (file)
@@ -856,6 +856,7 @@ var ZoomRegion = class ZoomRegion {
             this._updateMousePosition();
             this._connectSignals();
         } else {
+            Main.uiGroup.set_opacity(255);
             this._disconnectSignals();
             this._destroyActors();
         }
@@ -1404,6 +1405,9 @@ var ZoomRegion = class ZoomRegion {
 
         if (this.isActive() && this._isMouseOverRegion())
             this._magnifier.hideSystemCursor();
+
+        const uiGroupIsOccluded = this.isActive() && this._isFullScreen();
+        Main.uiGroup.set_opacity(uiGroupIsOccluded ? 0 : 255);
     }
 
     _changeROI(params) {